package HomeWork10;

public class Demo3 {
	    public static void main(String[] args) {
	        int n = 15; 
	        Thread[] threads = {
	            new Work3(i -> i % 3 == 0 && i % 5 == 0, i -> "fizzbuzz", n),
	            new  Work3(i -> i % 3 == 0 && i % 5 != 0, i -> "fizz", n),
	            new  Work3(i -> i % 5 == 0 && i % 3 != 0, i -> "buzz", n),
	            new  Work3(i -> i % 3 != 0 && i % 5 != 0, i -> Integer.toString(i), n)
	        };

	        for (Thread thread : threads) {
	            thread.start();
	        }
	    }
	}


